import http from "../utils/http/http.js";

const getOrderList = (data) => {
  return http.post("/api/workorder/list", data);
};
const getInitialOrderList = () => {
  return http.get("/api/workorder/list/initial");
};
const addWorkOrder = (data) => {
  return http.post("/api/workorder/add", data);
};
const createWorkOrder = (data) => {
  return http.post("/api/workorder/create", data);
};
const cancelWorkOrder = (id) => {
  return http.post("/api/workorder/cancel", id);
};
const updateWorkOrder = (data) => {
  return http.post("/api/workorder/update", data);
};
const payWorkOrder = (id) => {
  return http.get(`/api/workorder/pay/${id}`);
};
const confirmWorkOrder = (data) => {
  return http.post("/api/workorder/confirm", data);
};
const recheckDoneWorkOrder = (id) => {
  return http.get(`/api/workorder/recheck/done/${id}`);
};
export default {
  getOrderList,
  addWorkOrder,
  getInitialOrderList,
  createWorkOrder,
  cancelWorkOrder,
  updateWorkOrder,
  payWorkOrder,
  confirmWorkOrder,
  recheckDoneWorkOrder,
};
